using System;
using Unity.Collections;
using UnityEngine;

namespace Gameplay.PVE
{
    public struct AStarNodeData
    {
        public NativeArray<float> nodeF;

        public NativeArray<float> nodeG;

        public NativeArray<float> nodeH;

        public NativeArray<int> fatherIndex;

        public NativeArray<bool> isInCloseList;

        public NativeArray<bool> isInOpenList;

        public void Initialize(int nodeCount)
        {
            for (int i = 0; i < nodeCount; i++)
            {
                nodeF[i] = 0;
            }
            for (int i = 0; i < nodeCount; i++)
            {
                nodeG[i] = 0;
            }
            for (int i = 0; i < nodeCount; i++)
            {
                nodeH[i] = 0;
            }
            for (int i = 0; i < nodeCount; i++)
            {
                fatherIndex[i] = -1;
            }
            for (int i = 0; i < nodeCount; i++)
            {
                isInCloseList[i] = false;
            }
            for (int i = 0; i < nodeCount; i++)
            {
                isInOpenList[i] = false;
            }
        }
    }
}